
#ifndef UTILITIES_H
#define UTILITIES_H

#include <BIcon>
#include <BImage>
#include <BShape>
#include <BWidget>
#include <BScene>
#include <BTreeItem>
#include <BGraphicItem>

using namespace BWE;

BString FindValidName(const BScene* scene, const BString& name);
BString FindValidName(const BGroup* group, const BString& name);
BString FindValidName(const BNode* node, const BString& name);

BString FindValidName(const BTreeWidget* treeWidget, const BString& name);
BString FindValidName(const BTreeItem* item, const BString& name);
BString FindValidName(const BGraphicWidget* graphicWidget, const BString& name);
BString FindValidName(const BGraphicItem* item, const BString& name);

bool SmoothImage(BImage* image, float factor = 1.0f);

BIcon* TypedIcon(BObject* object);
BImage* TypedImage(BObject* object);

BIcon* TypedIcon(BObject* object, const BWidget* widget);
BImage* TypedImage(BObject* object, const BWidget* widget);

BShape* CreateProxy(BShape* shape, const BString& type);

#endif
